import React, { useContext, createContext } from 'react';
// BrowserRouter
import {
  BrowserRouter as Router,
  Switch,
  Route,
  Redirect,
  Link,
} from 'react-router-dom';
import Home from './pages/home';
import Login from './pages/login/Login';
const App = () => {
  return (
    <Router>
      <Switch>
        <Route
          exact
          path="/"
          render={(props) => {
            return <Home {...props} />;
          }}
        />
        <Route path="/login" component={Login} />
        <Route render={() => <Redirect to="/" />} />
      </Switch>
    </Router>
  );
}
export default App;
